package com.rds.system.common;

import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 数据操作通用Mapper层
 * @author LiChuanlong
 * @date 2021-08-12
 * @param <T>
 */
@Repository
public interface IMappper<T> {
    /**新增*/
    int insert (T entity) throws Exception;
    /**删除*/
    int delete(T entity) throws Exception;
    /**修改*/
    int update(T entity) throws Exception;
    /**根据Id查询*/
    T findById(Integer id) throws Exception;
    /**查询所有*/
    List<T> findAll(T entity) throws Exception;
    /**按条件查询*/
    List<T> filterData(Map<String,Object> map) throws Exception;
}
